package com.tian.service.impl;

import com.github.pagehelper.PageHelper;
import com.tian.mapper.AnimeMapper;
import com.tian.pojo.Anime;
import com.tian.service.AnimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AnimeServiceImpl implements AnimeService {
    @Autowired
    private AnimeMapper animeMapper;
    @Override
    public List<Anime> getAllAnime(Integer page, Integer size) {
        PageHelper.startPage(page,size);
        return animeMapper.getAllAnime(page,size);
    }

    @Override
    public void addAnime(Anime anime) {
        animeMapper.addAnime(anime);
    }
}
